Build
-
Build .
-
Build .
-
I found the
build.zigfile very useful, making it clear what will happen when building the project. -
zig build -hshows the options created by thebuild.zigfile. -
Some brief explanations of RayLib in Zig with and without bindings .
-
One of the shown options is to use RayLib with
@cImport
-
flags
-
--prefix/-p
.zig-cache
-
Contains files that will make subsequent builds faster
-
These files are not intended to be checked into source-control and this directory can be completely deleted at any time with no consequences.
build.zig.zon
-
In my understanding, the file contains the pathing of dependencies to be downloaded in order to build the project.
-
When running
zig run
-
Compiles the specified source code directly into a temporary binary.
-
Runs the binary immediately after compilation.
-
Does not use the build system, that is, it doesn't process the configurations defined there.
Resolving version conflicts
Comparisons
-
0.13.0 -> 0.14.0
-
Introduces problems in the
.namedescribed in thebuild.zig.zonfile, so that names must be in the format.my_name, I think. -
Although this can be changed in the project itself, all dependencies end up having this problem as well.
-
-
FunFacts!!
-
Some dependencies use a 0.14.0-dev version, so 0.13.0 is incompatible and 0.14.0 introduces problems with
.nameCoooool! =)
-
Running demos on different versions
-
Remember to use
.before the Zig path. -
."C:\Users\caior\apps\zig-windows-x86_64-0.14.0\zig.exe" build run -
."C:\Users\caior\apps\zig-windows-x86_64-0.13.0\zig.exe" build run -
."C:\Users\caior\apps\zig-windows-x86_64-0.12.1\zig.exe" build run